package com.lottery.ruok.lottrey.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ASUS on 2017/11/13.
 */

public class LotteryItem implements Parcelable {
    public String name;
    public boolean isFirst;
    public String title;
    public String odd;
    public String fillInString = "";
    public String rule_id;
    public boolean isChoose;
    public String rakeback;
    public boolean isFen;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeByte(isFirst ? (byte) 1 : (byte) 0);
        dest.writeByte(isChoose ? (byte) 1 : (byte) 0);
        dest.writeString(this.title);
        dest.writeString(this.odd);
        dest.writeString(this.fillInString);
        dest.writeString(this.rakeback);
        dest.writeByte(isFen ? (byte) 1 : (byte) 0);
    }

    public LotteryItem() {
    }

    protected LotteryItem(Parcel in) {
        this.name = in.readString();
        this.isFirst = in.readByte() != 0;
        this.isChoose = in.readByte() != 0;
        this.title = in.readString();
        this.odd = in.readString();
        this.fillInString = in.readString();
        this.rakeback = in.readString();
        this.isFen = in.readByte() != 0;
    }

    public final Creator<LotteryItem> CREATOR = new Creator<LotteryItem>() {
        public LotteryItem createFromParcel(Parcel source) {
            return new LotteryItem(source);
        }

        public LotteryItem[] newArray(int size) {
            return new LotteryItem[size];
        }
    };
}
